package com.lapian.designmode.flyweight.test.test_d;


import java.util.HashMap;

public class DouLuoDaLuFactoryD {
    private HashMap<String, ConcreteRoleD> pool=new HashMap<>();
    public AbstractRoleD getAbstractRoleD(String type) {
        if (!pool.containsKey(type)) {
            pool.put(type,new ConcreteRoleD(type));
        }
        return (AbstractRoleD) pool.get(type);
    }
}
